using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace ProyectoCyclopEee
{
    public partial class FormDeviceSelection : Form
    {
        int selectedDevice = -1;
        bool autoStartDevice = false;

        public int GetSelectedDevice()
        {
            return selectedDevice;
        }

        public bool GetAutoStartParam()
        {
            return autoStartDevice;
        }

        public FormDeviceSelection(string[] DeviceCollection)
        {
            InitializeComponent();
            FillDeviceComboBox(DeviceCollection);
        }

        private void FillDeviceComboBox(string[] DeviceCollection)
        {
            comboBoxDevices.Items.Clear();
            comboBoxDevices.Items.AddRange(DeviceCollection);
            comboBoxDevices.SelectedIndex = 0;
        }

        private void buttonOK_Click(object sender, EventArgs e)
        {
            selectedDevice = comboBoxDevices.SelectedIndex;
            autoStartDevice = checkBoxAutoStartDevice.Checked;
        }
    }
}